package com.shuguoyiyou.wechatofficialaccount.provider;

import com.shuguoyiyou.wechatofficialaccount.entity.form.UserOpenIdForm;
import com.shuguoyiyou.wechatofficialaccount.entity.po.User;
import com.springboot.cloud.common.core.entity.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;

/**
 * Created by ZengJian on 2021/2/3 0003 上午 9:22
 */
@FeignClient(name = "organization", fallback = ResourceProviderFallback.class)
public interface ResourceProvider {

    @PutMapping(value = "/user/updateOpenId")
    Result updateOpenId(@Valid @RequestBody UserOpenIdForm userOpenIdForm);

    @GetMapping(value = "/user/getUserByOpenId")
    String getUserByOpenId(@RequestParam("openId") String openId);
}
